package com.neuedu.dao;

import java.sql.Connection;
import java.sql.PreparedStatement;

import com.neuedu.po.CaseinfoPO;

public class UpdateDAO {

	public void insertCaseinfo(Connection conn, CaseinfoPO po) throws Exception {
		String sql = "INSERT INTO caseinfo VALUES (NULL, ?, ?)";
		try {
			PreparedStatement pst = conn.prepareStatement(sql);
			pst.setInt(1, po.getCaseNo());
			pst.setString(2, po.getCaseInfo());
			pst.executeUpdate();
		} catch (Exception e) {
			throw e;
		}
	}
	
	public void updateDiagstatus(Connection conn,int caseNo) throws Exception
	{
		String sql = "update register set diag_status = 2 where case_no = ?";
		try {
			PreparedStatement pst = conn.prepareStatement(sql);
			pst.setInt(1, caseNo);
			pst.executeUpdate();
		} catch (Exception e) {
			throw e;
		}
	}
	
}
